package org.heart.service.impl;

import lombok.extern.slf4j.Slf4j;
import org.heart.service.CommonService;
import org.heart.thirdService.hefengAPI.req.Location;
import org.heart.thirdService.hefengAPI.service.HeFengApiService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
@Slf4j
public class CommonServiceImpl implements CommonService {

    @Resource
    private HeFengApiService heFengApiService;

    @Override
    public Location getUserAddress(String latitude, String longitude) {

        Location location = heFengApiService.getLocation(latitude,longitude);

        log.info("查询地区信息：{}",location);

        return location;
    }
}
